﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace qf_cms.templates
{
	public partial class viewArticle : System.Web.UI.Page
	{
		LogicLayer mgr = new LogicLayer();
		protected string aid = "", curTitle = "", curContent = "", breadcrumbs = "", cutTime="";

		protected void Page_Load(object sender, EventArgs e)
		{
			aid = Request.QueryString["aid"] + "";
			CMS_Article art = mgr.GetCMS_Article(aid);
			if (art != null)
			{
				curTitle = art.ArticleTitle;
				curContent = art.ArticleContent;
				cutTime = art.CreateTime.ToString("yyyy-MM-dd");

				breadcrumbs = mgr.GetBreadcrumbs(art.ColumnID);
				if (breadcrumbs.Length > 2)
					breadcrumbs = breadcrumbs.Substring(0, breadcrumbs.Length - 2);
			}
		}
	}
}